Fill
使用给定的常量值填充输出数组。
\[dst_i = value \quad \text{for} \quad i = 0,1,\dots,N-1\]
- 输入:
value - 待填充的常量值地址。
length - 填充的元素个数。
core_mask - 核掩码(仅适用于共享存储版本)。
- 输出:
output - 填充结果地址。
- 支持平台:
FT78NEMT7004备注
FT78NE 支持fp, dp, int8, int16, int32, cplx64, cplx128
MT7004 支持hp, fp, int16, int32, cplx64
共享存储版本:
-
void i8_fill_s(int8_t *value, int8_t *output, int length, int core_mask)
-
void i16_fill_s(int16_t *value, int16_t *output, int length, int core_mask)
-
void i32_fill_s(int32_t *value, int32_t *output, int length, int core_mask)
-
void hp_fill_s(float16 *value, float16 *output, int length, int core_mask)
-
void fp_fill_s(float *value, float *output, int length, int core_mask)
-
void dp_fill_s(double *value, double *output, int length, int core_mask)
-
void c64_fill_s(float *value, float *output, int length, int core_mask)
-
void c128_fill_s(double *value, double *output, int length, int core_mask)
C调用示例:
1//MT7004示例(共享存储多核,DDR 地址) 2#include <stdio.h> 3 4int main(int argc, char* argv[]) { 5 float value = 1.0f; 6 float *output = (float *)0x88000000; 7 int length = 1024; 8 int core_mask = 0xff; 9 fp_fill_s(&value, output, length, core_mask); 10 return 0; 11}
私有存储版本:
-
void i8_fill_p(int8_t *value, int8_t *output, int length)
-
void i16_fill_p(int16_t *value, int16_t *output, int length)
-
void i32_fill_p(int32_t *value, int32_t *output, int length)
-
void hp_fill_p(float16 *value, float16 *output, int length)
-
void fp_fill_p(float *value, float *output, int length)
-
void dp_fill_p(double *value, double *output, int length)
-
void c64_fill_p(float *value, float *output, int length)
-
void c128_fill_p(double *value, double *output, int length)
C调用示例:
1//MT7004示例(私有存储单核,AM 地址) 2#include <stdio.h> 3 4int main(int argc, char* argv[]) { 5 float value = 1.0f; 6 float *output = (float *)0x10000000; 7 int length = 1024; 8 fp_fill_p(&value, output, length); 9 return 0; 10}